package com.luban.moudle.register;

import com.luban.moudle.instance.InstanceInfo;
import com.luban.moudle.instance.Lease;

import java.util.LinkedList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class RegisterServer {

    //每隔10秒线程一次
    public static final  Long RECENTLY_SERVICE_CHECK_INTERVAL=10*1000L;

    private ConcurrentHashMap<String, Map<String, Lease<InstanceInfo>>>
            register = new ConcurrentHashMap<>();

    private ConcurrentHashMap<String, Lease<ServerInfo>>
            server = new ConcurrentHashMap<>();

    private static RegisterServer registerServer = new RegisterServer();


    private RegisterServer(){

    }

    public static RegisterServer getIntance(){
        return  registerServer;
    }

    public ConcurrentHashMap<String, Map<String, Lease<InstanceInfo>>> getRegister(){
        return register;
    }

    public ConcurrentHashMap<String, Lease<ServerInfo>> getServer(){

        return server;
    }


}
